package com.htthorizon.common.core.desensitization.strategy;

import com.github.houbb.sensitive.api.IContext;
import com.github.houbb.sensitive.core.api.strategory.AbstractStringStrategy;

/**
 * @author Brilliant
 */

public class StrategyEmail extends AbstractStringStrategy {
    @Override
    protected int getBeforeMaskLen(Object original, IContext context, char[] chars) {
        return 1;
    }

    @Override
    protected int getAfterMaskLen(Object original, IContext context, char[] chars) {
        if (chars.length<10){
            return 3;
        }
        return 7;
    }
}
